package com.zheng.damo01.homeWeark.作业七;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        MyArrayList list=new MyArrayList();
        User u1=new User(10,"aa");
        User u2=new User(11,"bb");
        User u3=new User(22,"cc");
        User u4=new User(33,"dd");
        list.add(u1);
        list.add(u2);
        list.add(u3);
        System.out.println(Arrays.toString(list.getAll()));
        list.remove(0);
        System.out.println(Arrays.toString(list.getAll()));
        list.set(0,u4);
        System.out.println(Arrays.toString(list.getAll()));
        System.out.println(list.get(1));
        Selector my= list.select();
        while (my.hasNext()){
            System.out.println(my.next());
        }
    }
}
